2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__
27 #define __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__
29 #include "../../../../juce/juce_amalgamated.h"
32 //==============================================================================
34 Base class for a browser plugin object.
36 You need to implement a createBrowserPlugin() function that the host will call
37 when it needs a new instance of your BrowserPluginComponent subclass. The host will
38 delete the BrowserPluginComponent later when the user navigates away from the
41 class BrowserPluginComponent
: public Component
44 //==============================================================================
46 Creates a browser plugin object.
47 @see createBrowserPlugin
49 BrowserPluginComponent();
52 ~BrowserPluginComponent();
54 //==============================================================================
55 /** Returns a string describing the host browser version.
57 const String
getBrowserVersion() const;
59 /** Returns the URL that the browser is currently showing.
61 const String
getBrowserURL() const;
63 /** The plugin must implement this method to return a variant object whose
64 properties and methods can be accessed by javascript in the browser.
66 If your plugin doesn't need to represent itself, you can just return
67 a void var() object here.
69 virtual const var
getJavascriptObject() = 0;
72 //==============================================================================
73 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BrowserPluginComponent
);
77 //==============================================================================
79 This function must be implemented somewhere in your code to create the actual
80 plugin object that you want to use.
82 Obviously multiple instances may be used simultaneously, so be VERY cautious
83 in your use of static variables!
85 BrowserPluginComponent
* JUCE_CALLTYPE
createBrowserPlugin();
88 #endif // __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__